package com.example.controller;

import com.example.domain.xsrb.OAXsrbFinalEntity;
import com.example.domain.xsrb.OAXsrbMainEntity;
import com.example.service.OAXsrbService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 销售日报
 * 
 * @author ljl
 *
 */
@Slf4j
@RestController
@RequestMapping("/api/OAXsrb")
public class OAXsrbController {

	@Autowired
	private OAXsrbService oaXsrbService;

	/**
	 * 获取泛微系统的销售日报
	 * 
	 * @return
	 */
	@GetMapping("/xsrb")
	public List<OAXsrbFinalEntity>  getXsrb() {
		System.out.println("1");
		return oaXsrbService.queryXsrbMain();
	}

	/**
	 * 交补天数导出
	 * @return
	 */
	@RequestMapping("/xsrb/export")
	public String jbtsExport() {
		return "/excel/" + oaXsrbService.xsrbExport();
	}


}
